<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
$this->load->view('logged_in/components/header', array('current_page'=>1));
//print_r($article);
?>
<!-- Main Wrapper -->

<div id="main-wrapper">
	<div class="container">

		<div class="row">
			<?php $this->load->view('logged_in/blog/left_panel');?>
			<div class="8u skel-cell-important">

				<!-- Content -->
				<div id="content">
						<article>
							<h2><?php echo $article['title']?></h2>   <!--todo link to article-->
							<div class="10u" style="width: 70%; margin: 0 auto;" >
								<?php if($article['image'] != '')
									echo '<a href="'.base_url().'blog/article/'.$article["id"].'"><img style="width: 100%; border-radius: 5px; display: " src="'. base_url(). 'images/article_image/' . $article['image'] .'"></a>' ;
								?>
							</div>
							<div>
								<?php echo $article['content']; ?>
							</div>
						</article>
				</div>

				<div style="text-align: center;">
					<a href="<?php echo base_url().'blog/edit/'.$article['id']?>"
					   class="button fa fa-pencil" style="padding: 0.5em 1em; margin-top: 1em; background-color: #ff1e1a">Edit this article</a>
				</div>
			</div>
		</div>
	</div>
</div>
<?php
$this ->load->view('logged_in/components/footer');
?>
